﻿using Core.Framework;

namespace Core.DataAccess.ApiJson.SearchService
{
    public class SearchPagination
    {
        public string IndexName { get; set; }
        public string SearchField { get; set; }
        public string Value { get; set; }
        public string Column { get; set; }
        public GEOObject SortByGeo { get; set; }
        public Pagination Pagination { get; set; }
    }


    public class SearchCondition
    {
        public ConditionEnum SearchType { get; set; }
        public string SearchField { get; set; }
        public object Value { get; set; }
        public Geo Geo { get; set; }
    }


    public class GEOObject
    {
        public Geo geo { get; set; }
        public string unit { get; set; }
    }

    public class Geo
    {
        public float lat { get; set; }
        public float lon { get; set; }
    }

    public enum ConditionEnum
    {
        // 模糊匹配（支持1位拼写错误）
        Like,
        // 地理位置
        Geo,
        // 正则
        Rex,
        // 通配符
        Wildcard
    }


}
